package com.bw.yk02.fnc;

import com.bw.yk02.util.IkanalyzerUtil;
import org.apache.flink.table.annotation.DataTypeHint;
import org.apache.flink.table.annotation.FunctionHint;
import org.apache.flink.table.functions.TableFunction;
import org.apache.flink.types.Row;

import java.util.List;

@FunctionHint(output =@DataTypeHint("ROW<keyword11111,STRING>"))
public class MyIKanalyzerFunction extends TableFunction {
    public void eval(String str) {
        List<String> list= IkanalyzerUtil.getIkanalyzer(str);
        for (String s:list) {
            collect(Row.of(s));
        }
    }
}
